/*
 * Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved.
 *
 * https://www.mall4j.com/
 *
 * 未经允许，不可做商业用途！
 *
 * 版权所有，侵权必究！
 */

package com.wskj.system.enums;

import com.wskj.common.enums.BaseEnum;
import lombok.Getter;

import java.util.Objects;

/**
 * sys_notice
 * status-NoticeTypeEnum
 * @author gun
 */
@Getter
public enum NoticeStatusEnum implements BaseEnum<String> {

	/** 1-公告 */
	NORMAL("1","正常"),
	/** 2-通知 */
	CLOSE("0","关闭"),
	;

	private String value;

	private String desc;

	NoticeStatusEnum(String value, String desc) {
		this.value = value;
		this.desc = desc;
	}

	public static NoticeStatusEnum getEnumByValue(String value) {
		if (Objects.isNull(value)) {
			return null;
		}
		for (NoticeStatusEnum item : NoticeStatusEnum.values()) {
			if (item.value.equals(value)) {
				return item;
			}
		}
		return null;
	}
}
